#ifndef FLASH_WIDGET_H
#define FLASH_WIDGET_H


#include <ActiveQt/QAxWidget>

class FlashWidget : public QWidget
{
	Q_OBJECT
public:
	FlashWidget( QWidget * parent = 0, Qt::WindowFlags f = 0);
	virtual ~FlashWidget();

	void loadFlash(const QString& fileName);
	QRect getClipRect();
	void setPaintRect(bool bPaint=true) {m_bPaint = bPaint;}

public slots:
	void timerOut();
	void startAutoSave();
protected:

	virtual void mousePressEvent(QMouseEvent *event);
	virtual void mouseMoveEvent(QMouseEvent *event);
	virtual void mouseReleaseEvent(QMouseEvent *event);

	virtual void paintEvent( QPaintEvent * event );

	void resizeEvent(QResizeEvent *event);
protected:
	QAxWidget*	m_flash;
	QRect		m_clipRect;
	bool		m_bPaint;
	long		m_nFrames;
	long		m_nCurFrame;
	QTimer*		m_pTimer;
	QString		m_fileName;
	QString		m_filePath;
};
#endif